home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d7
/
dvball10.arc
/
DVBALLS.DOC
< prev
next >
Wrap
Text File
|
1991-09-27
|
6KB
|
130 lines
DVBALLS
Version 1.0 27-Sep-91
by Monte Ferguson
NOTE: DVBALLS is a DESQview specific program - it will NOT run unless
you're using DESQview 2.01 or higher.
WHAT IT IS
DVBALLS is a silly DESQview demo program. I wrote it to familiarize
myself with the DV interprocess communication API calls.
The idea is to run more than one copy of DVBALLS at a time - then watch
the copies bounce little "balls" around inside their windows, passing them
back and forth between one another.
HOW TO RUN IT
Use the "Add a Program" command from DV's Open menu to add the BL-PIF.DVP
file (which you should have got with this DOC file and DVBALLS.EXE) to
your DESQview menu. You may need to modify the paths or keystrokes... See
your DV manual for instructions if you're lost.
Now, open BL from the Open menu - the first time you run DVBALLS, the
program becomes the Ball Server. Every subsequent time you run BL (once
you have a Sever running) that "instance" of BL will be a Client. Try
it, open BL twice.
You should have two DV windows open, one called DVBalls Server, and one
called DVBalls Client #1. Now switch to the Server window and press B to
add a ball. A little ball (ok, it's square) will start bouncing around
the window.
Notice the following things:
A) The Server program will have a "1" somewhere in it's window - that
is the "hole" that leads to Client #1 (if you open another BL instance,
you'll get a Clint #2 and a digit 2 in the server window, and so on). If a
ball hits a digit, the ball "falls" to that client.
B) Each Client program will have the letter "S" somewhere in it's window.
This is the "hole" that leads back up to the server - if a ball hits an S
it's passed back to the server.
That's essentially it. The balls bounce around between the windows...
which doesn't *sound* particulary interesting unless you realize that each
"window" is actually a separate EXE running under DV.
BELLS AND WHISTLES
Here are some keys that do things:
B - Adds another ball. Only works in the Server window. You can have up
to 10 balls bouncing around at once - that 10 TOTAL between the Sever and
it's Clients.
A - Show letters instead of the "block". This acts as a toggle, and will
make it easier to track the progress of individual balls. Note that the
letter toggle works only on the instance you currently have selected - ie,
if you toggle letters on in the Server it won't toggle the clients.
S - Shuffle. In the Server, the S key will make all the client "holes"
(numbers) move to random spots, as well as moving all the balls to the
upper left-hand corner. In a Client the S key moves the server hole.
- (minus sign) In the Server this will throw away a ball (if there are
any in the Server window). In a client the minus key will send all it's
balls back to the server.
1 through 9 - Only works in the Server. Will send a ball (if there are
any in the Server's window) to the client number you press.
O - Will "hide" the holes, so balls can't leave the window. Press S
(Shuffle) to bring the holes back.
Esc - will close that instance.
NOTES ON CLOSING: If you close an instance with either the Esc key or the
Close Window command from the DV menu, everything will shut down nicely.
If you're closing a client, it will notify the Server of it's passing, and
take any balls it had with it to the bit bucket. If you close the Server
it will notify all clients to shut down as well (a quick way to stop all
the action).
IF, on the other hand, you shut down by using Ctrl-Alt-Del (or, heaven
forbid, a Bug crashes an instance!), the other windows will get ticked.
Sooner or later you'll get a complaint from DESQview that a "program
error" has occured... just press Esc and the window will shut down.
LIMITS
This release of DVBALLS supports up to 9 clients and up to 10 balls. The
Server window shows you which clients and balls have been allocated on the
1st line.
DISTRIBUTION
This program is copyright (C) 1991 by Monte Ferguson. You may use it as
you will and distribute it as you will. Have fun.
Guarantee: This program works to my satisfaction on my machine. That's
the ONLY guarantee you get. If you can't get it to work, or you find a
bug, that's just tough luck for you.
If you would like the source code, that'll cost you $10.00. NOTE: you
can NOT compile the program without Quarterdeck's API libraries for
QuickBASIC! You Have Been Warned: Don't send me ten bucks and then whine
because you can't compile the code if you haven't bought the libs... NO
REFUNDS. And NO I won't send you a copy of the libs, that's piracy.
TECHNICAL STUFF
This program was written in Microsoft QuickBASIC 4.5, using the
Quarterdeck DESQview API Basic Library. For people who care about such
things, it's about 600 lines of code. I don't promise that this is the
best code in the world, I wrote it seat-of-the-pants as a learning
exercise.
AUTHOR
Monte Ferguson
PFG Consulting
1250 Anita Drive Suite #304
Kent, OH 44240
Release History:
1.0: First Release.